Implementation

Our system consists of five major components.
These are listed below in the order they were introduced to the project.

Selecting DecaWave DWM1000 for Ranging

The DecaWave DW1000 Module uses RF (radio frequency) between 3-6 GHz to send correlated messages between an initiator and a responder in order to perform two-way ranging. The initiator uses timestamps from transmission and reception of the messages, as well as the built in delay between messages, to calculate time-of-flight and derive the distance to the responder.


Combining DecaWave with PIC32 Microcontroller

While the DecaWave chip showed promise for our purpose, we needed an SPI interface to it, or the different subsystems could not be integrated. The PIC32MX795 microcontroller did that. As the primary computational system, it facilitates all of the data transactions between subsystems on the board. It required rewritting the DecaWave API code, as well as writing code for the magnetometer and Wi-Fi communication, but once the program is loaded the PIC32 is able to quickly and accurately communicate between the different subsystems so that they can operate uniformly.


Adding the MAG3110 Magnetometer

The MAG3110 magnetometer measures magnetic field strength in three dimensions which is equivalent to measuring orientation as a vector with respect to north. The magnetometer takes these measurements multiple times a second and sends the data to the PIC32 via serial I2C.


Wi-Fi Connections

The ESP8266-1 is a programmable, low-cost Wifi chip. It was programmed with custom software that enabled the chip to act as a UART bridge between the PIC32 and an MQTT server. It's function was to pass the distance and orientation data from the board to the MQTT which went to the GUI.


Graphic User Interface

The GUI is a visual representation of the positioning system. It continually orients the robot in it's current position. This position is found by storing an array of the robot's distance from a responder, taken from the MQTT, and using trilateration based on the average of the array to each responder. This yields a single point on the field.
The robot's orientation is found using the magnetometer measurements to compute the orientation with respect to north. A pre-measured angle between north and an axis of the field is added to give the orientation on the field.


Video of Demonstration - 5 May 2017